package com.yanq.liancar.activity;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.design.widget.AppBarLayout;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.vondear.rxtool.RxActivityTool;
import com.vondear.rxtool.view.RxToast;
import com.yanq.liancar.R;
import com.yanq.liancar.activity.base.BaseToolbarActivity;
import com.yanq.liancar.util.Utils;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class SmallCFullServiceActivity extends BaseToolbarActivity {
    @BindView(R.id.xiche)
    TextView xiche;
    @BindView(R.id.xiche2)
    TextView xiche2;
    @BindView(R.id.dala)
    TextView dala;
    @BindView(R.id.baoyang)
    TextView baoyang;
    @BindView(R.id.meirong)
    TextView meirong;
    @BindView(R.id.banjin)
    TextView banjin;
    @BindView(R.id.daiban)
    TextView daiban;
    @BindView(R.id.jiayou)
    TextView jiayou;
    @BindView(R.id.chaxun)
    TextView chaxun;
    @BindView(R.id.jiuyuan)
    TextView jiuyuan;
    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.tv_left)
    TextView tvLeft;
    @BindView(R.id.tv_right)
    TextView tvRight;
    @BindView(R.id.iv_right2)
    ImageView ivRight2;
    @BindView(R.id.iv_right)
    ImageView ivRight;
    @BindView(R.id.common_toolbar)
    Toolbar commonToolbar;
    @BindView(R.id.action_bar)
    AppBarLayout actionBar;
    @BindView(R.id.maiche)
    TextView maiche;
    @BindView(R.id.goumai)
    TextView goumai;
    @BindView(R.id.chexian)
    TextView chexian;
    @BindView(R.id.daijia)
    TextView daijia;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Utils.setStatusBar(this, true, false);
        setContentView(R.layout.activity_fullservice);
        ButterKnife.bind(this);
        mTvTitle.setText("全部服务");
    }

    @OnClick({R.id.xiche, R.id.xiche2, R.id.dala, R.id.baoyang, R.id.meirong, R.id.banjin, R.id.daiban, R.id.jiayou, R.id.chaxun, R.id.jiuyuan
            , R.id.maiche, R.id.goumai, R.id.chexian, R.id.daijia})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.xiche:
                Bundle bundle = new Bundle();
                bundle.putInt("type", 1);
                RxActivityTool.skipActivity(mContext, DelicateCarWashContentActivity.class, bundle);
                break;
            case R.id.xiche2:
                Bundle bundle1 = new Bundle();
                bundle1.putInt("type", 2);
                RxActivityTool.skipActivity(mContext, SmallCDelicateCarWashActivity.class, bundle1);
                break;
            case R.id.dala:
                Bundle bundle2 = new Bundle();
                bundle2.putInt("type", 7);
                RxActivityTool.skipActivity(mContext, SmallCDelicateCarWashActivity.class, bundle2);
                break;
            case R.id.baoyang:
                Bundle bundle3 = new Bundle();
                bundle3.putInt("type", 4);
                RxActivityTool.skipActivity(mContext, SmallCDelicateCarWashActivity.class, bundle3);
                break;
            case R.id.meirong:
                Bundle bundle4 = new Bundle();
                bundle4.putInt("type", 3);
                RxActivityTool.skipActivity(mContext, SmallCDelicateCarWashActivity.class, bundle4);
                break;
            case R.id.banjin:
                Bundle bundle5 = new Bundle();
                bundle5.putInt("type", 5);
                RxActivityTool.skipActivity(mContext, SmallCDelicateCarWashActivity.class, bundle5);
                break;
            case R.id.daiban:
                //第一次修改
                //                                Bundle bundle6=new Bundle();
                //                                bundle6.putInt("type",6);
                //                                RxActivityTool.skipActivity(mContext, SmallCDelicateCarWashActivity.class,bundle6);
                //第二次修改
                //                RxToast.error("服务暂未开放");
                //第三次修改
                RxActivityTool.skipActivity(mContext, AgencyServiceActivity.class);
                break;
            case R.id.jiayou:
                RxActivityTool.skipActivity(mContext, SmallCFuelFillingActivity.class);
                break;
            case R.id.chaxun:
                RxActivityTool.skipActivity(mContext, SmallCQueryActivity.class);
                break;
            case R.id.jiuyuan:
                RxActivityTool.skipActivity(this, SmallCRescueActivity.class);
                break;
            case R.id.maiche:
                RxActivityTool.skipActivity(this, CarSellingActivity.class);
                break;
            case R.id.goumai:
                RxActivityTool.skipActivity(this, SmallCBuyVIPActivity.class);
                break;
            case R.id.chexian:
                RxActivityTool.skipActivity(this, SmallCAutoinsurance.class);
                break;
            case R.id.daijia:
                RxActivityTool.skipActivity(this, DesignatedDrivingActivity.class);
                break;
        }
    }

}
